/**
 * 绑定模块到req
 * @param {*} app 
 */
module.exports = app => {
  return (req, res, next) => {
    const modelName = req.params.resource
    req.Model = require(`../models/${modelName}`)
    next()
  }
}